<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>user info</title>
</head>
<body>

<table width="100%" align="center">
<tr>
<td>
	<form:form modelAttribute="userInfo" action="${pageContext.request.contextPath}/user/update">
		<fieldset class="userInfoForm">
		<center><img src="${pageContext.request.contextPath}/resources/icons/user_info.png" /></center>
		<table width="100%" height="100%">
		Moje dane
		<br /><br />
			<tr height="20">
			<td valign="middle">Imię</td>
			<td valign="middle"><form:input type="hidden" path="username"/><form:input path="firstname" /></td>
			</tr>
			<tr height="20">
			<td valign="middle">Nazwisko</td>
			<td valign="middle"><form:input path="lastname"/></td>
			</tr>
			<tr height="20">
			<td valign="middle">Data urodzenia</td>
			<td valign="middle"><form:input path="birthdate"/></td>
			</tr>
			<tr height="20">
			<td valign="middle">Ulica</td>
			<td valign="middle"><form:input path="street"/></td>
			</tr>
			<tr height="20">
			<td valign="middle">Miejscowosc</td>
			<td valign="middle"><form:input path="city"/></td>
			</tr>
			<tr height="20">
			<td valign="middle">Kod pocztowy</td>
			<td valign="middle"><form:input path="post"/></td>
			</tr>
			<tr height="20">
			<td valign="middle">Firma</td>
			<td valign="middle"><form:input path="companyname"/></td>
			</tr>
			<tr height="20">
			<td valign="middle">Adres firmy</td>
			<td valign="middle"><form:textarea rows="4" path="companyaddress"/></td>
			</tr>
			<c:if test="${param.edit=='1'}">
				<tr>
				<td colspan="2" valign="top"><button type="submit" class="skip">Aktualizuj dane</button><br /></td>
				</tr>
			</c:if>
		</table>
		</fieldset>
	</form:form>
</td>
</tr>
</table>

</body>
</html>
